from django.contrib.auth.decorators import login_required
from django.urls import path, re_path
from apps.project.views import project_view, opinion_view

# 2.x后必须指定app_name
app_name = 'project'

urlpatterns = [
    path('project_view/', login_required(project_view.project_view), name='project_view'),
    path('project_list/', login_required(project_view.project_list), name='project_list'),
    path('project_insert_view/', login_required(project_view.project_insert_view), name='project_insert_view'),
    path('project_insert/', login_required(project_view.project_insert), name='project_insert'),
    path('project_detail_view/', login_required(project_view.project_detail_view), name='project_detail_view'),
    path('project_insertuser/',login_required(project_view.project_insertuser), name='project_insertuser'),
    #//////////////
    path('opinion_view/', login_required(opinion_view.opinion_view), name='opinion_view'),
    path('opinion_list/', login_required(opinion_view.opinion_list), name='opinion_list'),
    path('opinion_insert_view/', login_required(opinion_view.opinion_insert_view), name='opinion_insert_view'),
    path('opinion_insert/', login_required(opinion_view.opinion_insert), name='opinion_insert'),
    path('opinion_edit_view/', login_required(opinion_view.opinion_edit_view), name='opinion_edit_view'),
    path('opinion_edit/<int:id>', login_required(opinion_view.opinion_edit), name='opinion_edit'),
    path('opinion_del/<int:id>', login_required(opinion_view.opinion_del), name='opinion_del'),
]
